<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>

    <title>
      Graphique
    </title>

    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    
	  <script type="text/javascript">
      google.load('visualization', '1', {packages: ['corechart']});
    </script>
	
    <script type="text/javascript">
      function drawVisualization() {
	  	
		//get the Querystring value and use it in function
	    var parameters = unescape(window.location.href.slice(window.location.href.indexOf('?') + 1));
		//console.log("params = ",parameters);
		
		var json = eval ('(' + parameters + ')');		
    // Create and populate the data table.
    var data = new google.visualization.DataTable();

    data.addColumn('string', 'Nom');
    data.addColumn('number', 'Nombre de commit');
		
		var number = json.length;
        data.addRows(number);
		
		for (var i = 0; i <number; i++){
			data.setValue(i, 0, json[i].Nom);
			data.setValue(i, 1, json[i].NombreCommits);	
		};
		
		var options = {};
		options.title = "Commit number / developper";
		options.pieSliceText = "value";
		options.is3D = true;
		options.width = window.innerWidth-50;
		options.height = window.innerHeight-150;
		
      
        // Create and draw the visualization.
        new google.visualization.PieChart(document.getElementById('visualization')).
        draw(data, options);
      }
      

  google.setOnLoadCallback(drawVisualization);
</script>
	
	
		
  </head>
  
  <body style="font-family: Arial;border: 0 none;">
 
     <div id="visualization" ></div>
  </body>

</html>
​